/**
 * @author zhouzhiheng98@foxmail.com 2020-07-23 17:19:29
 */
public class ConstructionPerson {
    private String name;
    private int age;

    /**
     * 构造方法Person
     */
    public ConstructionPerson(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public ConstructionPerson(String name) {
        // 调用另一个构造方法Person(String, int)
        this(name, 18);
    }

    public ConstructionPerson() {
        // 调用另一个构造方法Person(String)
        this("Unnamed");
    }

    public String getName() {
        return this.name;
    }

    public int getAge() {
        return this.age;
    }
}
